package com.tupu.service.impl.admin;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tupu.entity.admin.LabelPropertyInfo;
import com.tupu.mapper.admin.PropertyMapper;
import com.tupu.service.admin.PropertyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PropertyServiceImpl extends ServiceImpl<PropertyMapper, LabelPropertyInfo> implements PropertyService {

    @Autowired(required = false)
    private PropertyMapper propertyMapper;

    /**
     * 根据label_id查询所有属性
     *
     * @param label_id
     * @return
     */
    @Override
    public List<LabelPropertyInfo> findByLabelId(Long label_id) {
        List<LabelPropertyInfo> labelPropertyInfos = propertyMapper.findByLabelId(label_id);
        return labelPropertyInfos;
    }
}
